Socket: fix array index.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>