-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
修复 因为媒体服务器不存在 而导致的 panic - 数组溢出 ,并且新增媒体服务器提示状态. #347
Changes from 2 commits
e1679ef
8fdc32b
73c8dab
b7275b4
d3bab07
62a7671
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -224,6 +224,28 @@ func (s *Session) connect(addr Addr) (persistConn, error) { | |
func (s *Session) nextAddr() Addr { | ||
s.addrMu.Lock() | ||
defer s.addrMu.Unlock() | ||
|
||
if len(s.SsoAddr) == 0 { | ||
//fmt.Println("test") | ||
/** | ||
* Written by Bash | ||
* 没办法了,只有把媒体服务器地址写死在服务器里面,算是一种曲线救国 | ||
*/ | ||
Addre := [4]int{1936450177, 3211518593, 761732366, 993564539} | ||
SudoSuBash marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 所有变量名首字母小写。 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 抱歉,请把我这个pull requests删除了吧,目前测试,这种方法在发送语音时接口仍会报错199,但是在转发消息的时候它正常工作了。 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pr是删不掉的,只能close。 |
||
Port := [4]int{80, 8080, 443, 80} | ||
|
||
for i := 0; i < len(Addre); i++ { | ||
addr := Addr{ | ||
IP: uint32(Addre[i]), | ||
Port: Port[i], | ||
} | ||
s.SsoAddr = append(s.SsoAddr, addr) | ||
} | ||
|
||
//s.AppendAddr(1153745079,8080) | ||
//fmt.Println(len(s.SsoAddr)) | ||
} | ||
|
||
addr := s.SsoAddr[s.idx] | ||
s.idx = (s.idx + 1) % len(s.SsoAddr) | ||
return addr | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
删除不用的注释。