Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mtproto_proxy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mtproto_proxy
Commits
59b1af23
Unverified
Commit
59b1af23
authored
Mar 05, 2019
by
Сергей Прохоров
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix get_stacktrace deprecation warning
parent
26c8ce5c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
mtp_down_conn.erl
src/mtp_down_conn.erl
+8
-2
No files found.
src/mtp_down_conn.erl
View file @
59b1af23
...
@@ -36,6 +36,12 @@
...
@@ -36,6 +36,12 @@
-
define
(
MAX_NON_ACK_COUNT
,
300
).
-
define
(
MAX_NON_ACK_COUNT
,
300
).
-
define
(
MAX_NON_ACK_BYTES
,
1024
*
1024
*
6
).
% 6MB
-
define
(
MAX_NON_ACK_BYTES
,
1024
*
1024
*
6
).
% 6MB
-
ifndef
(
OTP_RELEASE
).
% pre-OTP21
-
define
(
WITH_STACKTRACE
(
T
,
R
,
S
),
T
:
R
->
S
=
erlang
:
get_stacktrace
(),
).
-
else
.
-
define
(
WITH_STACKTRACE
(
T
,
R
,
S
),
T
:
R
:
S
->
).
-
endif
.
-
type
handle
()
::
pid
().
-
type
handle
()
::
pid
().
-
type
upstream_opts
()
::
#
{
addr
:
=
mtp_config
:
netloc
(),
% IP/Port of TG client
-
type
upstream_opts
()
::
#
{
addr
:
=
mtp_config
:
netloc
(),
% IP/Port of TG client
ad_tag
=>
binary
()}.
ad_tag
=>
binary
()}.
...
@@ -121,9 +127,9 @@ handle_info(do_connect, #state{dc_id = DcId} = State) ->
...
@@ -121,9 +127,9 @@ handle_info(do_connect, #state{dc_id = DcId} = State) ->
try
try
{
ok
,
St1
}
=
connect
(
DcId
,
State
),
{
ok
,
St1
}
=
connect
(
DcId
,
State
),
{
noreply
,
St1
}
{
noreply
,
St1
}
catch
T
:
R
->
catch
?
WITH_STACKTRACE
(
Class
,
Reason
,
Stack
)
lager
:
error
(
"Down connect error:
~s
"
,
lager
:
error
(
"Down connect error:
~s
"
,
[
lager
:
pr_stacktrace
(
erlang
:
get_stacktrace
(),
{
T
,
R
})]),
[
lager
:
pr_stacktrace
(
Stack
,
{
Class
,
Reason
})]),
erlang
:
send_after
(
300
,
self
(),
do_connect
),
erlang
:
send_after
(
300
,
self
(),
do_connect
),
{
noreply
,
State
}
{
noreply
,
State
}
end
.
end
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment