Commit c7b4a1b
Prevent Context.RemoteAddr() from exploding when called from ConnCallback
When calling ctx.RemoteAddr() within ConnCallback one gets a panic due to
unsafe casting within the accessor. I understand it's not a valid scenario
as such, but I accidentally called a logger that expected that checked
for RemoteAddr() in ssh.Context
panic: interface conversion: interface is nil, not net.Addr
Signed-off-by: Alejandro Mery <amery@geeks.cl>1 parent 3427354 commit c7b4a1b
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
| |||
0 commit comments